package com.lsc.www.day09.hm;

import java.util.Scanner;

public class s1 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = 1;
        int i = 0, j = 0;
        while (num > 0 && num < 100000) {
            num = scanner.nextInt();
            if (num <= (-1)) {
                break;
            }
            i++;
        }
        System.out.print(i);
    }
}